#ifndef G729_INTERFACE_H
#define G729_INTERFACE_H

#ifdef WIN32
typedef signed short int16_t;
#else
#include <stdint.h>
#endif // WIN32

typedef struct G729_encinst_t_ G729_encinst_t;
typedef struct G729_decinst_t_ G729_decinst_t;

#ifdef __cplusplus
extern "C" {
#endif

int16_t WebRtcG729_CreateEnc(G729_encinst_t** inst);
int16_t WebRtcG729_CreateDec(G729_decinst_t** inst);
int16_t WebRtcG729_FreeEnc(G729_encinst_t* inst);
int16_t WebRtcG729_FreeDec(G729_decinst_t* inst);
int16_t WebRtcG729_Encode(G729_encinst_t* encInst, int16_t* input,
                                      int16_t len, int16_t* output);
int16_t WebRtcG729_EncoderInit(G729_encinst_t* encInst, int16_t mode);
int16_t WebRtcG729_Decode( G729_decinst_t *dec_inst,const int16_t *encoded,
						  int16_t len, int16_t *decoded,
						  int16_t *speechType );
int16_t WebRtcG729_DecodeBwe(G729_decinst_t* decInst, int16_t* input);
int16_t WebRtcG729_DecodePlc(G729_decinst_t* decInst);
int16_t WebRtcG729_DecoderInit(G729_decinst_t* decInst);

void WebRtcG729_Version(char *versionStr, short len);
#ifdef __cplusplus
};
#endif
#endif
